package com.ytjj.qmyx.admin.dao;

import com.ytjj.qmyx.admin.model.ReimbursementExcelRecord;
import com.ytjj.qmyx.admin.model.ReimbursementOrders;
import com.ytjj.qmyx.admin.model.ReimbursementOrdersInfo;
import com.ytjj.qmyx.admin.model.request.ReimbursementOrderRequest;
import com.ytjj.qmyx.admin.model.response.ReiOrderInfoResponse;
import com.ytjj.qmyx.admin.model.response.ReiOrderQueryResponse;
import com.ytjj.qmyx.admin.model.response.ReimbursementExportRecordResponse;
import com.ytjj.qmyx.admin.model.response.RelevantOrdersDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 报销管理相关
 */
public interface ReimbursementOrdersDao {


    /**
     * 获取报销单详情
     */
    List<ReiOrderInfoResponse> getDetailByReimbursementId(Integer reimbursementId);

    /**
     * 根据条件查询报销单
     */
    List<ReiOrderQueryResponse> getReiOrderDetail(ReimbursementOrderRequest request);

    /**
     * 子订单报销次数
     */
    List<RelevantOrdersDetail> getCountForChildNo(@Param("list") List<String> childOrderNos);

    /**
     * 子订单报销次数
     */
    List<ReiOrderQueryResponse> getCountExist(String childOrderNo,Integer reimbursementId);

    /**
     * 删除报销单
     */
    Integer delReimbursementOrders(Integer id);

    /**
     * 删除报销单关联的子订单
     */
    Integer delReimbursementOrdersDetails(Integer reimbursementId);

    /**
     * 获取子订单的报销历史
     */
    List<ReimbursementOrdersInfo> getChildOrderNoAssociated(String childOrderNos);

    /**
     * 更新报销单主单
     */
    Integer updateReimbursementOrder(ReimbursementOrders reimbursementOrders);

    /**
     * 获取报销单记录
     */
    ReimbursementExcelRecord getExcelRecord(Integer adminId);

    /**
     * 获取报销列表
     */
    List<ReimbursementExportRecordResponse> getExcelRecordHistory();


}